package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.starlink.common.PageInfoTwo;
import com.starlink.model.domain.MallBooksCategoryDO;
import com.starlink.model.request.MallBooksCategoryRequest;
import com.starlink.model.vo.MallBooksCategoryVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface MallBooksCategoryService extends IService<MallBooksCategoryDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    MallBooksCategoryVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfoTwo<MallBooksCategoryVO> pageQuery(MallBooksCategoryRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<MallBooksCategoryVO> listQuery(MallBooksCategoryRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(MallBooksCategoryRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(MallBooksCategoryRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteDOById(Long id);

    /**
     * 根据书籍ID查询对应分类
     * @param mallBooksId
     * @return
     */
    List<MallBooksCategoryVO> selectByBookId(Long mallBooksId);
}
